package controller

import (
	"fmt"
	sessionStore "github.com/test/src/github.com/http/session-store"
	"net/http"
)

func Logout(writer http.ResponseWriter, request *http.Request) {
	cookie, _ := request.Cookie(sessionStore.COOKIE_SESSION_ID)
	sessionId := cookie.Value
	delete(sessionStore.SessionMap, sessionId)
	fmt.Fprintf(writer, "bye")
}
